package com.design.patterns.creativeModel.adapter.wrapper;

import com.design.patterns.creativeModel.adapter.service.Students;
import com.design.patterns.creativeModel.adapter.service.Teacher;

public class TeacherAdapter implements Teacher {
    //内部持有一个待转换接口的引用
    private Students students;

    public TeacherAdapter(Students students) {
        this.students = students;
    }


    @Override
    public String lecture() {
        return students.preview();
    }
}
